-
Notifications
You must be signed in to change notification settings - Fork 159
Implement rule from #131 #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement rule from #131 #134
Conversation
I run your branch against Magento codebase. Here are some suspicious findings:
|
Hi @lenaorobei, Thanks for pointing that out, it appears that part of code responsible for detecting DocBlock of constants has a bug, and instead detecting that there is no const DocBlock, it detects one belonging to a class. In both outlined examples, there is a problem with DocBlock as pointed out, but only for classes. Which means that this change is actually ok, problem is one of previous commits. But since is mine either way, I will fix it and report back. |
@udovicic thank you for the fix. I'm just thinking out loud here. The rule says:
And what if there is no alternative? Example: /**
* Authorize.net Payment CC Types Source Model
* @deprecated 2.3.1 Authorize.net is removing all support for this payment method
*/
class Cctype extends PaymentCctype Does it make sense to add check: if explanation is provided after the
Need your thoughts here. We don't want to bother developers with false positive warnings. |
Opens up a room for being lazy and not specifying the alternative. On the other hand, it can't stay the way it is. So I agree with your proposal. Do you want me to change the source or do you want to consult with someone first? |
@udovicic let me discuss with internal teams and I'll get back to you. |
Let's add additional check if explanation is provided after the |
Hi @lenaorobei , just to make sure I fully understand last part, version is not counted as description? So examples that you provided:
Still stand correct? |
Sorry, I should have explain better. For now both cases should be fine. |
cf3d23f
to
037b4cb
Compare
@lenaorobei I have modified code to reflect latest request. I am not particularly happy with how it looks, but I have no idea how to refactor it to look better either. |
#134) Co-authored-by: Sergio Vera <svera@adobe.com>
Implementation of rule from #131